import React from 'react'
import { View, Text, ScrollView } from '@tarojs/components'
import './RecommendedReading.scss'
import RecommendItem from './RecommendItem'
import { AudioProvider } from './AudioContext'

interface RecommendedReadingProps {
  // 可以添加需要的属性
}

const RecommendedReading: React.FC<RecommendedReadingProps> = () => {
  return (
    <AudioProvider>
      <View className='recommended-reading'>
      {/* <View className='title-section'>
        <Text className='title-text'>推荐朗读</Text>
      </View> */}
      <div style={{ fontSize: 15, marginLeft: 15 }}>推荐朗读</div>
      <ScrollView scrollY className='content-area'>
        <View className='item-row'>
          <View className='item-col'>
            <RecommendItem
              title="《论语》选段"
              author="孔子"
              authorTitle="名家示范"
              preview="[岳飞]怒发冲冠，凭栏处、潇潇雨歇..."
              wordCount={93}
              readCount={59565}
              audioUrl="https://storage.googleapis.com/media-session/sintel/snow-fight.mp3"
            />
          </View>
          <View className='item-col'>
            <RecommendItem
              title="诗词品读：《将进酒》"
              author="李白"
              authorTitle="名家示范"
              preview="君不见黄河之水天上来，奔流到海不复回..."
              wordCount={108}
              readCount={42356}
              audioUrl="https://storage.googleapis.com/media-session/sintel/snow-fight.mp3"
            />
          </View>
        </View>
        <View className='item-row'>
          <View className='item-col'>
            <RecommendItem
              title="国学经典：《大学》导读"
              author="朱熹"
              authorTitle="名家注解"
              preview="大学之道，在明明德，在亲民，在止于至善..."
              wordCount={76}
              readCount={38721}
              audioUrl="https://storage.googleapis.com/media-session/sintel/snow-fight.mp3"
            />
          </View>
          <View className='item-col'>
            <RecommendItem
              title="国学经典：《大学》导读"
              author="朱熹"
              authorTitle="名家注解"
              preview="大学之道，在明明德，在亲民，在止于至善..."
              wordCount={76}
              readCount={38721}
              audioUrl="https://storage.googleapis.com/media-session/sintel/snow-fight.mp3"
            />
          </View>
        </View>
      </ScrollView>
      </View>
    </AudioProvider>
  )
}

export default RecommendedReading